package com.china.school.annotation;

import com.china.school.pojo.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Configuration
@ComponentScan
@Import({ImportSelectorImpl.class,ImportBeanDefinitionRegistrarImpl.class})
public class ImportTest {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(ImportTest.class);
        System.out.println(ctx.getBean("com.china.school.pojo.User"));
        System.out.println(ctx.getBean("teacher"));
        System.out.println(ctx.getBean(Cat.class));

    }
}
